if vlaue exists dont enter event c#

98

if vlaue exists don't enter event c# -

public bool rebateslip(int ticketID)
{
    SqlCommand myCommand  = new SqlCommand("SELECT ID FROM ticket WHERE ID = @ticketID", con);
    SqlDataAdapter sqlDa = new SqlDataAdapter(myCommand);

    myCommand.Parameters.AddWithValue("@ticketID", ticketID);
    var reader = myCommand.Execute();
    return reader.HasRows;    
}

Comments

Submit
0 Comments